﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

#endregion

namespace Weazel.Badger.Vhdl.Types
{
  public class UserDefinedArrayType : ArrayType, IDeclarativeItem
  {
    private static int id = 10000;

    private string name;

    public UserDefinedArrayType(string name, int width, Type elementType) : base(new TypeId(id++, name), width, elementType)
    {
      this.name = name;
    }

    public void Write(System.CodeDom.Compiler.IndentedTextWriter writer)
    {
      writer.WriteLine("Type {0} is Array (Natural range <>) of {1};", name, ElementType.ToString());
    }
  }
}
